# coding = utf-8
from rest_framework import serializers, exceptions, status
from rest_framework.serializers import Serializer, ModelSerializer, ListSerializer
from users.api.authentication import authenticate
from users.api.utils import jwt_payload_handler, jwt_encode_handler, login_record

from users.models import UserInfo, Role, Permission, UserLog


class MobileUserInfoReadOnlySerializer(ModelSerializer):
    """
    用户信息
    """
    class Meta:
        model = UserInfo
        fields = ["id", "name", "real_name", "is_superuser", "account", "house", "avatar"]
